package Java9_8;

import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;

public class Test_3 {
    public static void main(String[] args) {
        List list=new ArrayList();
        List list1 = new ArrayList();
        list.add("1");
        list.add(0,"2");
        list.clear();
        list.add("3");
        list.add("5");
        list1.add("5");
        list.addAll(1,list1);
        System.out.println(list);
        boolean contains = list.contains("3");
        System.out.println(contains);
        boolean b = list.containsAll(list1);
        System.out.println(b);
        boolean equals = list.equals(list1);
        System.out.println(equals);
        Object o = list.get(1);
        System.out.println(o);
        int i = list.hashCode();
        System.out.println(i);
        int i1 = list.indexOf(1);
        System.out.println(i1);
        boolean empty = list.isEmpty();
        System.out.println(empty);
        Iterator iterator = list.iterator();
        System.out.println(iterator);
        list.remove(1);
        list.remove("3");
        System.out.println(list);
        list.retainAll(list);
        list.add(0,3);
        list.set(1,0);
        int size = list.size();
        System.out.println(size);
        List list2 = list.subList(0, 1);
        System.out.println(list2);
        System.out.println(list);
        Object[] objects = list.toArray();
        for (Object o1:objects){
            System.out.println(o1);
        }

        /*for (Object o:list){
            System.out.println(o);
        }*/
        /*list.clear();
        System.out.println(list);*/



    }
}
